package com.badshun.stage;

import com.badlogic.gdx.scenes.scene2d.*;
import com.badshun.ui.*;
import com.badshun.player.*;
import com.badlogic.gdx.graphics.*;
import com.badlogic.gdx.*;
import com.badshun.box2d.*;

public class GameStage extends Stage {
	public Stage stage;
	
	private GameUI gameUI;
	
	public GameStage() {
		stage = new Stage();
	}
	
	public void createGameUI(MainPlayer mainPlayer,NPCPlayersManager npm,OrthographicCamera camera,Box2DWorld world) {
		gameUI = new GameUI(mainPlayer,npm,camera,world);

		stage.addActor(gameUI.leftButton);
		stage.addActor(gameUI.rightButton);
		stage.addActor(gameUI.upButton);
		stage.addActor(gameUI.downButton);
		stage.addActor(gameUI.actionButton);
	}
	
	@Override
	public void draw() {
		stage.act();
		stage.draw();
		
		if(gameUI != null) {
			gameUI.update();
		}
	}
}
